package com.itheima.edu.info.manager.controller;

import com.itheima.edu.info.manager.domain.Student;
import com.itheima.edu.info.manager.service.StudentService;
import com.itheima.edu.info.manager.util.DateUtil;

import java.util.Scanner;

/*
客服类:
专门和用户打交道的
*/
public class OtherStudentController extends  BaseStudentController{
    //封装学生对象
    public Student getStudent(String id) {
        System.out.println("请输入姓名:");
        String name = sc.next();
        System.out.println("请输入生日:");
        String birthday = sc.next();
        String age= DateUtil.getAgeByBirthday(birthday)+"";
        Student student = new Student(id, name, age, birthday);
        return student;
    }

}
